package base;

import java.util.HashMap;
import java.util.Map;

public class Parameter {

	public static String TYPE_MAX_DEPTH = "MAX_DEPTH";
	public static final String TYPE_DEPTH = "DEPTH";
	public static String TYPE_ARITY = "ARITY";
	public static final String TYPE_TERM_VALUE = "TERM_VALUE";
	public static final String TYPE_MACHINE_STEP = "MACHINE_STEP";
	public static final String TYPE_REPRODUCTION_RATE = "REPRODUCTION_RATE";
	public static final String TYPE_MUTATION_RATE = "MUTATION_RATE";
	public static final String TYPE_CROSSOVER_RATE = "CROSSOVER_RATE";
	public static final String TYPE_GENERATION = "GENERATION";
	public static final String TYPE_GENE_POPULATION = "GENE_POPULATION";
	public static final String TYPE_ROOTNODE_ARITY = "ROOTNODE_ARITY";
	public static final String TYPE_REFERENCE_SIZE = "REFERENCE_SIZE";
	

	public static final String TYPE_VALUE_RM = "TYPE_RM";
	public static final String TYPE_VALUE_PT = "TYPE_PT";
	public static final String TYPE_VALUE_CT = "TYPE_CT";
	public static final String TYPE_VALUE_RP = "TYPE_RP";

	Map<String, String> params = new HashMap<String, String>();

	public void addParameter(String name, String value) {
		params.put(name, value);
	}

	public Parameter() {
	}

	public String getValueToString(String name) { 

		return params.get(name);
	}

	public int getValueToInt(String name) {
		return Integer.valueOf(getValueToString(name));
	}

	public float getValueToFloat(String name) {
		return Float.valueOf(getValueToString(name));
	}

	public double getValueToDouble(String name) {

		return Double.valueOf(getValueToString(name));
	}
	
}